<!DOCTYPE html>
<html>

<head>
  <title></title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="../bootstrap-5.1.3-dist/css/bootstrap.css" rel="stylesheet">
  <script src="../bootstrap-5.1.3-dist/js/bootstrap.bundle.js"></script>
</head>

<body class="container">
  <h3 align="center">设置徽章的颜色</h3>
  <span class="badge bg-primary">主要</span>
  <span class="badge bg-secondary">次要</span>
  <span class="badge bg-success">成功</span>
  <span class="badge bg-danger">危险</span>
  <span class="badge bg-warning">警告</span>
  <span class="badge bg-info">信息</span>
  <span class="badge bg-light">明亮</span>
  <span class="badge bg-dark">深色</span>

</body>

</html>